<html>
<head>
<style type='text/css'>
body {
   background-color: white;
   margin: 1em 2em 1em 2em;
   font-family: Sans-Serif;
   color: #002;
   line-height: 140%;
   font-size: 12px;
}

h4 {
    font-size: 100%;
    font-style: normal;
    font-weight: bold;
}

h5 {
    font-size: 100%;
    font-style: italic;
    font-weight: normal;
}

pre {
   background-color: #eee;
   padding: 0.5em 0.5em 0.5em 2em;
}

@media print {
   pre {word-wrap:break-word; width:100%;}
} 

ul li,
ol li {
   padding-left: 0.3em;
   /*text-indent: -2em;*/
   margin-bottom: 0.5em;
}

em {
   font-style: normal;
   font-weight: bold;
   text-decoration: underline;
   color: #c40;
}

code {
   font-family: Monospace;
   font-size: 100%;
   color: #c40;
}

a, a * {
   text-decoration: underline;
   color: blue;
   /* border: 0.5px solid #aaa;
   white-space: nowrap;
   padding-right: 0.1em;
   padding-left: 0.1em;
   padding-bottom: -5px; */
}

a code {
   color: blue;
}

img {
   position: relative;
   bottom: -4px;
}

div.headline {
   font-weight: bold;
   font-size: 110%;
}

div.copyright {
   margin-top: 1em;
   border-top: 1px solid black;
   padding-top: 0.5em;
}

div.iris_headline {
   border-bottom: 1px solid black;
   padding-bottom: 0.3em;
}

.LaTeX {
   font-family: Monospace;
   font-size: 100%;
   border: 1px solid #060;
   color: #060;
}

code.LaTeX {
   background-color: white;
   padding: 0.5em 0.5em 0.5em 2em;
}
</style>
</head>

<body>
<div class="iris_headline">IRIS Toolbox Reference Manual</div>




<h2 id="report/table">table</h2>
<div class="headline">Start new table</div>

<h4 id="syntax">Syntax</h4>
<pre><code>P.table(Caption,...)</code></pre>
<h4 id="input-arguments">Input arguments</h4>
<ul>
<li><p><code>P</code> [ report ] - Report object created by the <a href="../report/new.html"><code>report.new</code></a> function.</p></li>
<li><p><code>Caption</code> [ char | cellstr ] - Title or a cell array with title and subtitle displayed at the top of the table; see Description for splitting the title or subtitle into multiple lines.</p></li>
</ul>
<h4 id="options">Options</h4>
<ul>
<li><p><code>'arrayStretch='</code> [ numeric | <em><code>1.15</code></em> ] - (Inheritable from parent objects) Stretch between lines in the table (in pts).</p></li>
<li><p><code>'captionTypeface='</code> [ cell | <em><code>'\large\bfseries'</code></em> ] - LaTeX format commands for typesetting the table caption and subcaption; you can use Inf for either to indicate the default format.</p></li>
<li><p><code>'colStruct='</code> [ struct | <em>empty</em> ] - (Not inheritable from parent objects) User-defined structure of the table columns; use of this option disables <code>'range='</code>.</p></li>
<li><p><code>'colWidth='</code> [ numeric | <em><code>NaN</code></em> ] - (Inheritable from parent objects) Width, or a vector of widhts, of the table columns in <code>em</code>units; <code>NaN</code> means the width of the column will adjust automatically.</p></li>
<li><p><code>'headlineJustify='</code> [ <em><code>'c'</code></em> | <code>'l'</code> | <code>'r'</code> ] - Horizontal alignment of the headline entries (individual dates or user-defined text): Centre, Left, Right.</p></li>
<li><p><code>'dateFormat='</code> [ char | cellstr | <em><code>irisget('dateformat')</code></em> ] - (Inheritable from parent objects) Format string for the date row.</p></li>
<li><p><code>'footnote='</code> [ char | <em>empty</em> ] - Footnote at the table title; only shows if the title is non-empty.</p></li>
<li><p><code>'long='</code> [ true | <em><code>false</code></em> ] - (Inheritable from parent objects) If true, the table may stretch over more than one page.</p></li>
<li><p><code>'longFoot='</code> [ char | <em>empty</em> ] - (Inheritable from parent objects) Works only with <code>'long='</code>=true: Footnote that appears at the bottom of the table (if it is longer than one page) on each page except the last one.</p></li>
<li><p><code>'longFootPosition='</code> [ <code>'centre'</code> | <em><code>'left'</code></em> | <code>'right'</code> ] - (Inheritable from parent objects) Works only with <code>'long='</code> <code>true</code>: Horizontal alignment of the footnote in long tables.</p></li>
<li><p><code>'range='</code> [ numeric | <em>empty</em> ] - (Inheritable from parent objects) Date range or vector of dates that will appear as columns of the table.</p></li>
<li><p><code>'separator='</code> [ char | <em><code>'\medskip\par'</code></em> ] - (Inheritable from parent objects)  commands that will be inserted after the table.</p></li>
<li><p><code>'sideways='</code> [ <code>true</code> | <em><code>false</code></em> ] - (Inheritable from parent objects) Print the table rotated by 90 degrees.</p></li>
<li><p><code>'tabcolsep='</code> [ <code>NaN</code> | numeric ] - (Inheritable from parent objects) Space between columns in the table, measured in em units; NaN means the  default.</p></li>
<li><p><code>'typeface='</code> [ char | <em>empty</em> ] - (Not inheritable from parent objects)  code specifying the typeface for the table as a whole; it must use the declarative forms (such as <code>\itshape</code>) and not the command forms (such as <code>\textit{...}</code>).</p></li>
<li><p><code>'vline='</code> [ numeric | <em>empty</em> ] - (Inheritable from parent objects) Vector of dates after which a vertical line (divider) will be placed.</p></li>
</ul>
<h4 id="generic-options">Generic options</h4>
<p>See help on <a href="../report/Contents.html">generic options</a> in report objects.</p>
<h4 id="description">Description</h4>
<p>Tables are top-level report objects and cannot be nested within other report objects, except <a href="../report/align.html"><code>align</code></a>. Table objects can have the following children:</p>
<ul>
<li><a href="../report/series.html"><code>series</code></a>;</li>
<li><a href="../report/subheading.html"><code>subheading</code></a>.</li>
</ul>
<p>By default, the date row is printed as a leading row with dates formated using the option <code>'dateFormat='</code>. Alternatively, you can specify this option as a cell array of two strings. In that case, the dates will be printed in two rows. The first row will have a date string displayed and centred for every year, and the first cell of the <code>'dateFormat='</code> option will be used for formatting. The second row will have a date displayed for every period (i.e. every column), and the second cell of the <code>'dateFormat='</code> option will be used for formatting.</p>
<h5 id="user-defined-structure-of-the-table-columns">User-defined structure of the table columns</h5>
<p>Use the option <code>'colStruct='</code> to define your own table columns. This gives you more flexibility than when using the <code>'range='</code> option in defining the content of the table.</p>
<p>The option <code>'colStruct='</code> must be a 1-by-N struct, where N is the number of columns you want in the table, with the following fields:</p>
<ul>
<li><p><code>'name='</code> - specifies the descriptor of the column that will be displayed in the headline;</p></li>
<li><p><code>'func='</code> - specifies a function that will be applied to the input series; if <code>'func='</code> is empty, no function will be applied. The function must evaluate to a tseries or a numeric scalar.</p></li>
<li><p><code>'date='</code> - specifies the date at which a number will be taken from the series unless the function <code>'func='</code> applied before resulted in a numeric scalar.</p></li>
</ul>
<h5 id="titles-and-subtitles">Titles and subtitles</h5>
<p>The input argument <code>Caption</code> can be either a text string, or a 1-by-2 cell array of strings. In the latter case, the first cell will be printed as a title, and the second cell will be printed as a subtitle.</p>
<p>To split the title or subtitle into multiple lines, use the following LaTeX commands wrapped in curly brackets: <code>{\\}</code> or <code>{\\[Xpt]}</code>, where <code>X</code> is the width of an extra vertical space (in points) added between the respective lines.</p>
<h4 id="example">Example</h4>
<p>Compare the headers of these two tables:</p>
<pre><code>x = report.new();

x.table(&#39;First table&#39;, ...
    &#39;range&#39;,qq(2010,1):qq(2012,4), ...
    &#39;dateformat&#39;,&#39;YYYYFP&#39;);
% You can add series or subheadings here.

x.table(&#39;Second table&#39;, ...
    &#39;range,qq(2010,1):qq(2012,4), ...
    &#39;dateformat&#39;,{&#39;YYYY&#39;,&#39;FP&#39;});
% You can add series or subheadings here.

x.publish(&#39;myreport.pdf&#39;);</code></pre>

</body>
<div class="copyright">IRIS Toolbox. Copyright &copy; 2007&#8212;2013 Jaromir Benes.</div>
</html>
